home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / C++ AppleLink Messages / CPlus.Dev$ 5⁄11⁄90 / 0124-Re[N] What's in Main-May90 < prev    next >
Encoding:
Text File  |  1990-05-11  |  1.6 KB  |  55 lines  |  [TEXT/GEOL]

  1. Item    1037317                         9-May-90        22:40PDT
  2.  
  3. From:   D3632                           Cadence Design, Ken Friedenbach,PRT
  4.  
  5. To:     V0683                           Amoco Tech, Eric Berdahl,VAR
  6.         MACAPP.TECH$                    MacApp Technical
  7.  
  8. cc:     CPLUS.APPLE$                    C++ Interest List--Apple Employees
  9.         CPLUS.DEV$                      C++ Interest List--Developers
  10.  
  11. Sub:    Re[N] What's in Main?
  12.  
  13. Dear Eric, et. al.
  14.  
  15. In response to your question:
  16.  
  17. > What needs to be in Main?
  18. > I have put nothing into Main.  Every one
  19. > of my methods is in ARes, ANonRes, etc.
  20. > Nothing uses Main.  However, Main is too full,
  21. > procedures are being linked past the jump table
  22. > 32K limit.  I need to take some of the default
  23. > stuff out of Main and put it elsewhere.
  24.  
  25. One way to blow Main without putting any code in,
  26. is to use Stream I/O to write to the Debug window,
  27. or to a file or string.
  28.  
  29. For instance:
  30.  
  31.     cout << "My Program of 12th of Never.\n" << flush;
  32.  
  33. inside of IdentifySoftware will do it.  Segment Main
  34. will be too big, even if the application is "Nothing".
  35.  
  36. I have been telling my students in C++ classes to
  37. resegment the C++ support library into another resident
  38. segement.  For instance, the following instructions:
  39.  
  40. # Set directory to C Libraries folder
  41.     Directory "{CLibraries}"
  42. # Make a copy of the CPlusLib.o
  43.     Move CPlusLib.o CPlusLib.o.temp
  44. # Use Lib utility to map Main segment stuff to ARes
  45.      Lib -sn Main=ARes -o CPlusLib.o  CPlusLib.o.temp
  46.  
  47. will create a CPlusLib.o with all code that was in Main in ARes.
  48.  
  49. This seems to solve the problem.
  50.  
  51. Hope this helps,
  52.  
  53. Ken
  54.  
  55.